/********************************************/
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				RateOptions.java
  //    Title   :			get the Rate Data into a list box
  //	FUNCTION:
  //	BY:				Poly Li
  //	DATE:				10/01/2004
  // --------------------------------------------------------------
/*********************************************/

package tss.options;

import tss.common.Options2;
import java.util.ArrayList;
import java.sql.Connection;

import tss.rate.*;

/**
 * A Class class.
 * <P>
 * @author HTHK
 */
public class RateOptions
  extends Options2
{

  /**
   * Constructor
   */
  public RateOptions() {
      this.load();
  }

  @Override
protected ArrayList createOptions(Connection con)
    throws Exception
  {
      ArrayList options = new ArrayList();
      RateBean Rate = RateProcess.createBean();
      Rate.setGrade("");
      RateBean[] Rates = RateProcess.find(con,Rate);
      for (int i=0; i<Rates.length; i++)
      {
          Options2.Option option
          = new Options2.Option( Rates[i].getGrade(),
                                Rates[i].getGrade());
          options.add(i,option);
      }
      return options;
  }


}

